﻿<?php $this->load->view('qt/header'); ?>
<!--  PAPER WRAP -->
    <div class="wrap-fluid">
        <div class="container-fluid paper-wrap bevel tlbr">

            <!-- CONTENT -->
            <!--TITLE -->
            <div class="row">
                <div id="paper-top">
                    <div class="col-sm-12">
                        <h2 class="tittle-content-header">
                            <i class="qt-network"></i>
                            <span id="title-header">
                                <?php echo (isset($this->title_header)) ? $this->title_header : 'TIMELINE';?>
                            </span>
                        </h2>
                    </div>
                </div>
            </div>
            <!--/ TITLE -->
            <ul id="breadcrumb">
                <li><span class="entypo-home"></span></li>
                <li><i class="fa fa-lg fa-angle-right"></i></li>
                <li><a href="#main">Trang chủ</a></li>
            </ul>
            <div class="content-wrap">
            <div class="nest" id="validationClose">
                <div class="title-alt" style="height: 30px;border: 1px solid #bcbcbc; border-bottom: none !important;">
                    <h6 style="margin: 0px; font-size: 12px; font-weight: bold">
                    <span style="background: url('<?php echo base_url('public/theme/'.T); ?>/images/p1.png') left top no-repeat; width: 16px; height: 15px; float:left;">&nbsp;</span>
                    <span style="margin-left: 6px; color: #ff6c09; font-size:: 13px; margin-top: 3px; float: left">Ghi chú</span></h6>
                  
                </div>

<style>
.datepicker{z-index:1151!important;}
.q-u,.qt-a{
	font-size: 20px;padding: 4px;cursor: pointer;
    color: #ffffff;
    float: left;
    margin-left: 15px;
}

.q-u:hover,.qt-a:hover{
	color: #E9E9E9;
}

.input-user input{
	width: 100%;
	
	padding: 5px;
}

.view-list-customer{
	position: absolute;
	background: #fff;
	padding: 0px;
	display: none;
	z-index: 100;
	border: 1px solid #B4B4B4;
}

.view-list-customer ul{
	padding: 0px;
	margin: 0px;
}

.view-list-customer ul li{
	list-style-type: none;
	border-bottom: 1px dotted #B4B4B4;
	padding: 4px 10px;
	cursor: pointer;
}

.view-list-customer ul li.active{
	background: #FFD873;
	color: #fff;
}

.view-list-customer ul li strong{
	display: block;
}

.view-list-customer ul li span{
	font-size: 10px;
	font-style: italic;
}

.input-datetime{
	position: absolute;
	top: 110px;
	background: #fff;
	z-index: 1000;
	border: 1px solid #ccc;
	padding: 10px 10px 2px 10px;
	left: 50px;
	width: 380px;
	display: none;
}

.select-customer{
    color: #898989;
    border: 1px solid #ccc;
    border-top: 1px dotted #ccc !important;
}

.item{
    color: #7d7d7d;
}


</style>

                <div class="body-nest" id="validation" style="padding: 0px;">
                    <div class="">
                        <section class="chat-list block" >
									<article class="chat-item left">
										<section class="chat-body">
											<div class="panel b-light text-sm m-b-none">
												<div style="">
													<textarea style="border: 1px solid #bcbcbc !important; border-bottom: none !important; resize:none; background: white; border-radius: 0px !important;" 
                                                    class="form-control parsley-validated content-post" rows="2" data-minwords="2" data-required="true" 
                                                    placeholder="Nhập nội dung ghi chú của bạn..."></textarea>
													<div class="input-user">

													</div>
													<input style="border-left: 1px solid #bcbcbc !important;
                                                                  border-right: 1px solid #bcbcbc !important;
                                                                  border-top: 1px dotted #bcbcbc !important;" type="hidden" class="id-customer" value="<?php if(isset($_REQUEST["cust_id"])){ echo $_REQUEST["cust_id"]; }?>" />
													<div class="view-list-customer">
														<ul class="compact" role="listbox">

														</ul>
													</div>
												</div>
												<footer class="" style="border-top-width: 0px;
                                                                        border-top-style: solid;
                                                                        border-top-color: rgb(234, 238, 241);
                                                                        background: rgb(188, 188, 188);
                                                                        height: 32px;">
                                                                        
													<div style="float: left;">
														<i class="qt-user q-u"></i>
                                                        <i class="qt-clock1 qt-a" style="margin-left: 5px !important;"></i> 
                                                        <span class="viewtimer" style="padding-top: 5px; float: left; color: white;"></span>
													</div>

													<div style="float: right;padding:4px 20px 2px 0px;" class="action-post-feed">

														<div class="btn-group"> 
                                                        
                                                        <button class="btn btn-default btn-xs btn-primary dropdown-toggle" data-toggle="dropdown" style="padding: 2px 9px !important;">
                                                        <i class="i qt-setting"></i>  Tác Vụ <span class="caret"></span></button>
															<ul class="dropdown-menu pull-right">
																<li><a href="javascript:postFeeds(1)"><i class="fa fa-sign-in"></i> Đăng</a></li> 
															</ul> </div>

																<!-- <a href="javascript:postFeeds()" class="btn btn-xs btn-info " style="padding:2px 20px">Đăng</a> -->
															</div>

															<div class="input-datetime">
																<div class="row">
																	<div  class="col-sm-12">
																		Ngày: <input type="text" class="input-datepicker" style="margin-left:5px;width: 90px;"/>
																		Giờ: <input type="text" class="input-timepicker" style="margin-left:5px;width: 90px;"/>
                                                                        <a class="btn btn-xs btn-info submit-date" style="padding:2px 20px; background-color: #ff6700 !important;">OK</a>
																	<div style="text-align: right;padding:5px"></div>
                                                                    </div>
																</div>
																
															</div>
															<div style="clear:both"></div>
														</footer>
													</div>
												</section>
											</article>
										</section>
                    </div>
                </div>
            </div>
            
            
                <div class="time-wrap">
                    <div class="row">
                        <div class="col-md-12">
                            <!-- The time line -->
                            <?php 
                                $qtdate = '';
                                    foreach($this->data["result"] as $value){
                                ?>
                            <ul class="timeline">
                                <!-- timeline time label -->
                                <?php if($qtdate == '' || $qtdate != @date("d/m/Y",$value["feed_action_time"]) ): ?>
                                <?php $qtdate = @date("d/m/Y",$value["feed_action_time"]); ?>
                                <li class="time-label">
                                    <span class="bg-red">
                                        <?php echo $qtdate; ?>
                                    </span>
                                </li>
                                <?php endif; ?>
                                <!-- /.timeline-label -->
                                
                                
                                <!-- timeline item -->
                                <li>
                                    <i class="fa bg-time" style="background: url('<?php echo base_url('public/theme/'.T); ?>/images/seo.png') !important;"></i>
                                    <div class="timeline-item">
                                        
                                        <span class="time" style="margin-left: 10px; color: #424242"><i class="qt-clock1" style="color: #424242;"></i> <?php echo @date("h:i:s",$value["feed_action_time"]); ?></span>
                                        <span class="time"  style="color: #424242;"><i class="qt-time1" style="color: #424242;"></i> <?php echo @date("d/m/Y",$value["feed_action_time"]); ?></span>
                                        <h3 class="timeline-header"><a href="#" style="font-weight: bold;"><?php

										$user_info = $this->session->userdata('user_info');
										echo $user_info["full_name"];
										?></a> 
                                        <span style="margin: 0px 10px 0px 20px;">gặp khách hàng</span>
                                        <a class="mr" href="<?php echo base_url()?>customer/detail?id=<?php echo $value["cust_id"]?>"><?php echo $value["cust_first_name"]." ".$value["cust_last_name"]; ?></a>
                                        </h3>
                                        
                                        <div class="timeline-body" style="color: #808080;">
                                            <?php echo $value["feed_content"]?>
                                        </div>
                                    </div>
                                </li>
                                <!-- END timeline item -->
                                
                                
                                <li>
                                    <i class="fa bg-time">...</i>
                                </li>
                            </ul>
                            <?php } ?>
                        </div>
                        <!-- /.col -->
                    </div>
                    <!-- /.row -->
                </div>
                
                            
            </div>
     
<?php $this->load->view('qt/footer'); ?>
<script>
	loadNotification();
</script>